package com.lenovo.lcdm.dcm.service.impl;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cache.interceptor.KeyGenerator;
import org.springframework.stereotype.Component;

import java.lang.reflect.Method;

/**
 * @Auther xujing30
 * @Date 2024/03/01
 * @Description
 */
@Component("categoryKeyGenerator")
public class CategoryKeyGenerator implements KeyGenerator {
    @Value("${spring.cache.redis.key-prefix}")
    private String prefix;

    @Override
    public Object generate(Object target, Method method, Object... params) {
        return prefix + ":BusinessConfiguration:category";
    }
}
